package com.example.othree.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.example.othree.entity.CropsYieldYearData;
import com.example.othree.entity.PollutionHistoryDataJjjSites;
import com.example.othree.mapper.CropsYieldYearDataMapper;
import com.example.othree.mapper.PollutionHistoryDataJjjSitesMapper;
import com.example.othree.service.PollutionHistoryDataJjjSitesService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zogran
 * @since 2024-11-12
 */
@Service
public class PollutionHistoryDataJjjSitesServiceImpl extends ServiceImpl<PollutionHistoryDataJjjSitesMapper, PollutionHistoryDataJjjSites> implements PollutionHistoryDataJjjSitesService {
    @Resource
    PollutionHistoryDataJjjSitesMapper pollutionHistoryDataJjjSitesMapper;
    @Override
    public IPage PageList(IPage<PollutionHistoryDataJjjSites> page, Wrapper wrapper) {
        return pollutionHistoryDataJjjSitesMapper.PageList(page,wrapper);
    }

    @Override
    public IPage pollutionPageList(IPage<HashMap<String, String>> page, String[] cities, String[] elements, String startTime, String endTime) {
        return pollutionHistoryDataJjjSitesMapper.pollutionPageList(page, cities, elements, startTime, endTime);
    }

    @Override
    public List<PollutionHistoryDataJjjSites> pollutionDataForHour(String[] cities, String element, String startTime, String endTime) {
        return pollutionHistoryDataJjjSitesMapper.pollutionListByDate(cities, element, startTime, endTime);
    }

    @Override
    public List<HashMap<String, String>> pollutionAnalyzeDataByCityForEvery(String startTime, String endTime, String element, String[] cities) {
        return pollutionHistoryDataJjjSitesMapper.pollutionForSiteByEvery(startTime, endTime, element, cities);
    }

    @Override
    public List<HashMap<String, String>> pollutionAnalyzeDataByTime(String startTime, String endTime, String[] stations) {
        return pollutionHistoryDataJjjSitesMapper.pollutionAnalyzeDataByTime(startTime, endTime, stations);
    }

}
